<?php
if(!isset($_SESSION)) 
	{ 
		session_start(); 
	}
	include '../../connection/connection.php';	
	include '../../value/value_kr.php';
	
	$idrowuser = $_REQUEST['idrowuser'];
	
	$selecuserbyid = mysql_query("Select * from caruser where iUser =  $idrowuser",$connection);
	$row = mysql_fetch_assoc($selecuserbyid);
?>
<table cellpadding="0" cellspacing="0" border="0" width="90%" class="tbm1" style="margin-bottom:10px">    
 <tr>
                <td><?php echo $l_usern?></td>
                <td><input type="text" class="intext" style="width:150px;padding-left: 5px;line-height: 26px;text-align: left;" id="txtUser" name="txtUser" value="<?=$row[szUser]?>"/></td>
                <td><?php echo $l_passw?></td>
                <td><input type="password" class="intext" style="width:150px;padding-left: 5px;line-height: 26px;text-align: left;" id="txtpass" name="txtpass" value="<?=$row[szPasswd]?>"/></td>
                <td><?php echo $l_dept?></td>
                <td><input type="text" class="intext" style="width:150px;padding-left: 5px;line-height: 26px;text-align: left;" id="txtdepart" name="txtdepart" value="<?=$row[szTeam]?>"/></td>
                <td><?php echo $l_homephone?></td>
                <td><input type="text" class="intext" style="width:150px;padding-left: 5px;line-height: 26px;text-align: left;" id="txthomephone" name="txthomephone" value="<?=$row[szPhone]?>"/></td>
                <td><?php echo $l_role?></td>
                <td>
                	<select class="seltop" size="1" name="roleuser" id="roleuser">
                		<option value="Admin" id="Admin" <?php if ($row[szPower]=='Admin'){?> selected="selected" <?php }?>>Admin</option>
                		<option value="User" id="User" <?php if ($row[szPower]=='User'){?> selected="selected" <?php }?>>User</option>
					</select>
                </td>
                <td><input type="button" class="inbtn" style="width: 65px;"  value="<?php echo $l_new?>"  id="buttonadd" name="buttonadd"  onclick="checkUserExist();"/></td>
                <td><input type="button" class="inbtn" style="width: 65px;"  value="<?php echo $l_reset?>" onclick="resetUser();" id="buttonreset" name="buttonreset"/></td>
            </tr>   
           <tr>
                <td>IP</td>
                <td><input type="text" class="intext" style="width:150px;padding-left: 5px;line-height: 26px;text-align: left;" id="txtIP" name="txtIP" value="<?=$row[szIP]?>"/></td>
                <td><?php echo $l_confirmpass?></td>
                <td><input type="password" class="intext" style="width:150px;padding-left: 5px;line-height: 26px;text-align: left;" id="txtconfirmPass" name="txtconfirmPass" value="<?=$row[szPasswd]?>"/></td>
                <td></td>
                <td></td>
                <td><?php echo $l_mobilephone?></td>
                <td><input type="text" class="intext" style="width:150px;padding-left: 5px;line-height: 26px;text-align: left;" id="txttelphone" name="txttelphone" value="<?=$row[szMobile]?>"/></td>
                <td></td>
                <td></td>
                <td><input type="button" class="inbtnDisable" style="width: 65px;"  value="<?php echo $l_edit?>" id="buttonedit" name="buttonedit" disabled="disabled" 
                 onclick="editUser();"/></td>
                <td><input type="button" class="inbtnDisable" style="width: 65px;"  value="<?php echo $l_delete?>"  id="buttondelete" name="buttondelete"  disabled="disabled" 
                  onclick="if(confirm('<?=$l_areyousure?>')){ deleteUser();return true;}else{return false;}"/></td>
            </tr>
            </table>
             <?php mysql_close($connection);?>